namespace TXLooker.WorkItemExtention.WIQL
{
    using System;
    using System.Collections;
    using System.Reflection;

    public abstract class NodeVariableList : Node
    {
        private ArrayList m_list;

        protected NodeVariableList(NodeType type) : base(type)
        {
            this.m_list = new ArrayList();
        }

        public void Add(Node node)
        {
            this.m_list.Add(node);
        }

        public void Clear()
        {
            this.m_list.Clear();
        }

        public void Insert(int i, Node node)
        {
            this.m_list.Insert(i, node);
        }

        public void RemoveAt(int i)
        {
            this.m_list.RemoveAt(i);
        }

        public override string ToString()
        {
            return base.JoinChildren(", ");
        }

        public override int Count
        {
            get
            {
                return this.m_list.Count;
            }
        }

        public override DataType DataType
        {
            get
            {
                return base.GetChildrenDataType();
            }
        }

        public override bool IsConst
        {
            get
            {
                return base.GetChildrenIsConst();
            }
        }

        public override bool IsScalar
        {
            get
            {
                return false;
            }
        }

        public override Node this[int i]
        {
            get
            {
                return (Node) this.m_list[i];
            }
            set
            {
                this.m_list[i] = value;
            }
        }
    }
}

